package cn.z2huo.demo.mapstruct.service;

import cn.z2huo.demo.mapstruct.dao.user.UserDAO;
import cn.z2huo.demo.mapstruct.dao.user.role.UserRoleRelationDAO;
import cn.z2huo.demo.mapstruct.dataobject.UserDO;
import cn.z2huo.demo.mapstruct.dataobject.UserRoleRelationDO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *
 * @author z2huo
 */
@Service
@RequiredArgsConstructor
public class UserServiceImpl {

    private final UserDAO userDAO;

    private final UserRoleRelationDAO userRoleRelationDAO;

    public UserDO getUserByCode(String userCode) {
        return userDAO.getUserByCode(userCode);
    }

    public List<UserRoleRelationDO> getUserRoleList(String userCode) {
        return userRoleRelationDAO.getUserRoleList(userCode);
    }

}
